begintownscript;

variables;

 short choice;
 body;
 
beginstate INIT_STATE;
 
if (get_flag(2,20) == 0){ message_dialog("Ouch. That was unexpected. Well, with no way back up, foreward is the only way.","");
 set_flag(2,20,1);
 } 
if (get_flag(4,15) == 3){ message_dialog("Well, you made it. Now what?","");
 set_ticks_forward(17000-get_current_tick());
 set_flag(4,15,4);
 } 
break;
 
beginstate EXIT_STATE;
 break;
 
beginstate START_STATE;
 
if ((get_flag(4,15) == 4) && (get_current_tick() == 17005)){ message_dialog("Well, with no way out, we might as well walk around or wait...","");
 };
 
break;
 
beginstate 10;
 if (get_flag(4,15) == 0){ reset_dialog();
 
add_dialog_str(0,"There is a dark portal here, would you like to enter it?",0);
 
add_dialog_choice(0,"No.");
 
add_dialog_choice(1,"Enter portal.");
 if (run_dialog(1) == 2){ play_sound(10);
 move_to_new_town(14,14,14);
 } else
 block_entry(1);
 } break;
 
beginstate 11;
 if (get_flag(4,15) == 4){ 
pause(8);
 play_sound(10);
 move_to_new_town(16,16,6);
 } break;
